const fs = require('fs-extra')
const path = require('path')
const global = require('./global')

let list = []

module.exports = {
  isExists(path) {
    return fs.existsSync(path)
  },
  isDirectory(path) {
    const stat = fs.statSync(path)
    return stat.isDirectory()
  },
  getTop() {
    return fs.readdirSync(path.join(global.root, 'docs'))
  },
}